package com.ruoyi.user.service;

import java.util.LinkedList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.support.Convert;
import com.ruoyi.user.domain.Step;
import com.ruoyi.user.domain.bo.StepListResponseBo;
import com.ruoyi.user.mapper.StepMapper;

/**
 * 计步 服务层实现
 * 
 * @author ruoyi
 * @date 2018-12-23
 */
@Service
public class StepServiceImpl implements IStepService 
{
	@Autowired
	private StepMapper stepMapper;

	/**
     * 查询计步信息
     * 
     * @param id 计步ID
     * @return 计步信息
     */
    @Override
	public Step selectStepById(Integer id)
	{
	    return stepMapper.selectStepById(id);
	}
	
	/**
     * 查询计步列表
     * 
     * @param step 计步信息
     * @return 计步集合
     */
	@Override
	public List<Step> selectStepList(Step step)
	{
	    return stepMapper.selectStepList(step);
	}
	
    /**
     * 新增计步
     * 
     * @param step 计步信息
     * @return 结果
     */
	@Override
	public int insertStep(Step step)
	{
	    return stepMapper.insertStep(step);
	}
	
	/**
     * 修改计步
     * 
     * @param step 计步信息
     * @return 结果
     */
	@Override
	public int updateStep(Step step)
	{
	    return stepMapper.updateStep(step);
	}

	/**
     * 删除计步对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteStepByIds(String ids)
	{
		return stepMapper.deleteStepByIds(Convert.toStrArray(ids));
	}

	@Override
	public StepListResponseBo selectStepListByDay(String dayTime,String mCode) {
		return stepMapper.selectStepListByDay(dayTime,mCode);
	}

	@Override
	public Step selectNewStep(Step step) {
		return stepMapper.selectNewStep(step);
	}

	@Override
	public LinkedList<Step> selectSleepStepList(Step step) {
		return stepMapper.selectSleepStepList(step);
	}

	@Override
	public LinkedList<Step> selectStepWebList(String date) {
		return stepMapper.selectStepWebList(date);
	}
	
	@Override
	public LinkedList<Step> selectStepCount() {
		return stepMapper.selectStepCount();
	}
	
}
